Web browsers are used to access web resources from web servers via a network such as the Internet. Conventionally, navigation of web resources by web browsers has operated according to a “pull” model of client-server communication, wherein the web browser (client) sends a request to a web server for a web resource (e.g. a web page or an element of a web page), and the web server then responds either by providing the requested web resource if it is available and the web browser client is authorized to access it, or by providing an error message. If the publisher of the web resource later publishes a newer version of the web resource to the web server, the web server simply makes that newer version available to web browsers that would later request it. No indication is provided to the web browser having obtained the older version of the web resource that the newer version is available. Thus, in such case, the version of the web resource obtained by the web browser (and presented to a user of the web browser) no longer corresponds to the latest published version. In some cases, this incoherence of web resource versions as between the web browser and the web server may not be problematic. But if coherence is important, the only solution under a conventional pull model of web communications is for the web browser to periodically poll (i.e. send requests) the web server so as to obtain the latest version of the web resource. Even so, the freshness of the web resource is limited to the polling period, and in many cases, the repeated polling may be wasteful of computing and network resources because the web resource may not have changed since the last request.
Various alternatives to the conventional “pull” model have been devised. At the other extreme is the “push” model of client-server communication, wherein the determination as to when a network resource is to be transmitted from the server to the client is the responsibility of the server rather than that of the client. In such a model, the client first registers with the server in respect of a resource, the server next sends an initial version of the resource, and then, every time a newer version of the resource is published, the server automatically sends (“pushes”) the newer version to the client.
Relative to the “pull” model, the advantage of the “push” model is that the latest version of the resource is always provided to the client, thereby maximizing coherence between the server and the client. However, in cases where at least some incoherence is tolerable, the “push” model is wasteful of computing and network resources because it unnecessarily insists on consuming resources to provide the latest version. In the web communications context, various technologies implement the “push” model, such as the “Server Push” mechanism of the SPDY protocol, included in the Chromium project.
Carving out a middle ground, an alternative to the “push” model is the “Server Hint” mechanism of the SPDY protocol, whereby the web server provides to the web browser not the newer version of an updated web resource, but simply an indication that such updated web resource is available. This mechanism therefore allows the web browser to determine whether it is desirable to obtain the newer version (e.g. by prompting the user of the web browser) and either initiate the download of the newer version or not, in accordance with such determination. While the “Server Hint” presents a convenient balance between the “pull” and “push” models, it requires that both the web browser and the web server implement the SPDY protocol. As of August 2014, estimates are that less than 1% of websites use SPDY.
There is therefore a need for improved methods for coordinating web communications.